<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<html>
	<head>
		<meta charset="UTF-8">
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="apple-mobile-web-app-status-bar-style" content="default" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="format-detection" content="telephone=no" />
		<link href="${ctxStatic}/jiu/css/weui.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
		<title>系统提示</title>
	</head>
	<body>
		<div class="container" id="container"><div class="page msg_warn js_show">
		    <div class="weui-msg">
		        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
		        <div class="weui-msg__text-area">
		            <h2 class="weui-msg__title">${msg }</h2>
		            <%-- <p class="weui-msg__desc">${msg }</p> --%>
		        </div>
		        <div class="weui-msg__opr-area">
		            <p class="weui-btn-area">
		                <a href="javascript:fanshen();" class="weui-btn weui-btn_primary">确认</a>
		            </p>
		        </div>
		        <div class="weui-msg__extra-area">
		            <div class="weui-footer">
		                <p class="weui-footer__links">
		                    <a href="javascript:void(0);" class="weui-footer__link">微引擎科技</a>
		                </p>
		                <!-- <p class="weui-footer__text">Copyright © 2008-2016 weui.io</p> -->
		            </div>
		        </div>
		    </div>
		</div></div>
		<script type="text/javascript">
			window.alert = function(name){
			  var iframe = document.createElement("IFRAME");
			  iframe.style.display="none";
			  iframe.setAttribute("src", 'data:text/plain,');
			  document.documentElement.appendChild(iframe);
			  window.frames[0].window.alert(name);
			  iframe.parentNode.removeChild(iframe);
			 };
			 
			 window.confirm = function (message) {
			   var iframe = document.createElement("IFRAME");
			   iframe.style.display = "none";
			   iframe.setAttribute("src", 'data:text/plain,');
			   document.documentElement.appendChild(iframe);
			   var alertFrame = window.frames[0];
			   var result = alertFrame.window.confirm(message);
			   iframe.parentNode.removeChild(iframe);
			   return result;
			 };
		
			function fanshen(){
				var id = ${orderId};
				$.ajax({
					type: 'POST',
					url: "${ctxFront }/jiuApply/fanshen",
					dataType: "json",
					cache:true,
					async:false,
					data: {id:id},
					success: function (data) {
						alert(data.message); 
			            if(data.msg=='success'){
			            	WeixinJSBridge.call('closeWindow');
			            }
					}
				});	
			}
		</script>
	</body>
</html>
